<div id="theme-info" class="clearfix">
  <h3>
    <%= @theme.title %> (v<%= @theme.version %>)by <% if @theme.author %><a href="<%= @theme.homepage %>"><%= @theme.author %></a><% else %>Unknown<% end %>
    <%= link_to_function 'close', 'Dialog.close()', :id => 'close-dialog' %>
  </h3>
  <div id="screenshot">
    <img src="<%= url_for(:controller => '/admin/themes', :action => 'preview_for', :id => @theme) %>" alt="Theme preview" title="<%=h @theme.title %> (v<%=h @theme.version %>)" />
    <p><%= @theme.summary %></p>
  </div>
  <div id="theme-options">
    <ul>
    <% unless @theme.current? -%>
      <li><%= link_to _('Use theme'), :action => 'change_to', :id => @theme %></li>
      <li><%= link_to _('Edit theme'), :controller => 'design', :action => 'index', :theme => @theme %></li>
    <% else -%>
      <li><%= link_to _('Edit theme'), :controller => 'design', :action => 'index' %></li>
    <% end -%>
      <li><%= link_to _('Download theme'), :action => 'export', :id => @theme %></li>
    <% unless @theme.current? -%>
      <li><%= link_to_remote _('Delete theme'), :url => {:action => 'destroy', :id => @theme}, :method => :delete,
                :confirm => _("Are you sure you wish to delete this theme stored at 'themes/site-%{id}/%{path}'?") % {:id => site.id, :path => @theme.path.relative_path_from(site.theme_path).to_s} %></li>
    <% end -%>
    </ul>
  </div>
</div>